﻿@typeparam TValue
@inherits TextInputBase<TValue>

<div class=@FieldClass>
@if (!string.IsNullOrEmpty(UseLabel))
{
    <label for=@Id class=@ClassNames(TextAreaInput.LabelClasses, LabelClass)>@UseLabel</label>
}
    <div class="mt-1 relative">
        <textarea id=@Id name=@Id @bind-value="CurrentValue" @bind-value:event="oninput" placeHolder=@UsePlaceholder @attributes="IncludeAttributes"
                  class=@ClassNames(TextAreaInput.InputBaseClasses, 
                  CssClass(TextAreaInput.InputValidClasses,TextAreaInput.InputInvalidClasses)) />
    @if (HasErrorField)
    {
        <p class="@TextAreaInput.ErrorClasses" id=@($"{Id}-error")>@ErrorFieldMessage</p>
    }
    else if (!string.IsNullOrEmpty(UseHelp))
    {
        <p id=@($"{Id}-description") class="text-gray-500">@UseHelp</p>
    }
    </div>
</div>
